package com.mzj.saas.config.qiyuesuo;

import com.qiyuesuo.sdk.v2.SdkClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QiYueSuoConfig {

	@Value("${qiyuesuo.url}")
	private String serverUrl;

	@Value("${qiyuesuo.accesskey}")
	private String accessKey;

	@Value("${qiyuesuo.accesssecret}")
	private String accessSecret;

	@Bean
	public SdkClient getSdkClient() {
		return new SdkClient(serverUrl, accessKey, accessSecret);
	}

	public String getServerUrl() {
		return serverUrl;
	}

	public void setServerUrl(String serverUrl) {
		this.serverUrl = serverUrl;
	}

	public String getAccessKey() {
		return accessKey;
	}

	public void setAccessKey(String accessKey) {
		this.accessKey = accessKey;
	}

	public String getAccessSecret() {
		return accessSecret;
	}

	public void setAccessSecret(String accessSecret) {
		this.accessSecret = accessSecret;
	}

}